package com.iqik.ioc.ctrl;


import com.iqik.ioc.anno.Autowired;
import com.iqik.ioc.anno.Service;
import com.iqik.ioc.service.AccountService;
import com.iqik.ioc.service.impl.AccountServiceImpl;

@Service
public class Controller {

    @Autowired
    private AccountService accountService;

    public void error(int from, int to) {
        try {
            accountService.transferError(from, to);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }


    public void success(int from, int to) {
        try {
            accountService.transferSuccess(from, to);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
